Matthias Clasen [Wed, 29 May 2019 05:50:48 +0000 (05:50 +0000)]
Drop gdk_display_get_monitor_at_point
This api expects global coordinates, and
is unused.
Matthias Clasen [Wed, 29 May 2019 05:34:46 +0000 (05:34 +0000)]
window: Drop gtk_window_set_position
This is heavily using global coordinates, and
can't be guaranteed to work across wms / platforms.
Matthias Clasen [Wed, 29 May 2019 05:34:16 +0000 (05:34 +0000)]
tests: Stop using gtk_window_set_position
This api is going away.
Matthias Clasen [Wed, 29 May 2019 05:33:39 +0000 (05:33 +0000)]
gtk-demo: Stop using gtk_window_set_position
This api is going away.
Matthias Clasen [Wed, 29 May 2019 04:53:10 +0000 (00:53 -0400)]
Drop gdk_surface_get_frame_extents
No longer used.
Matthias Clasen [Wed, 29 May 2019 04:43:04 +0000 (04:43 +0000)]
a11y: Stop using gdk_surface_get_frame_extnts
This api is going away.
Matthias Clasen [Wed, 29 May 2019 04:31:04 +0000 (00:31 -0400)]
x11: Set surface position correctly
The X backend was storing global coordinates
in surface->x/y, and keeping the parent-relative
positions in its own fields. Switch this around
to store the relative position in x/y, as is
expected by the frontend.
Matthias Clasen [Wed, 29 May 2019 04:30:03 +0000 (00:30 -0400)]
Clarify gdk_surface_get_position
This function returns the position relative to
the surface parent, so will always return 0 for
non-popups. The out arguments don't need to
allow-none either - nobody passes NULL for these.
Matthias Clasen [Wed, 29 May 2019 03:55:46 +0000 (23:55 -0400)]
a11y: Stop using gdk_surface_get_origin
Global coordinates are going away.
Stop supporting ATK_XY_SCREEN.
Matthias Clasen [Wed, 29 May 2019 03:43:05 +0000 (23:43 -0400)]
main: Use gdk_surface_translate_coordinates
This gets rid of another use of global coordinates.
Matthias Clasen [Wed, 29 May 2019 03:41:56 +0000 (23:41 -0400)]
surface: Add coordinate translation
We maintain offsets for popups, so we can translate
coordinates between surfaces that are attached directly
or indirectly to the same toplevel. Add an api for that.
Matthias Clasen [Wed, 29 May 2019 15:05:06 +0000 (15:05 +0000)]
testgtk: Fix a crash
Somebody forgot to update the signal handler
here when changing the size-allocate signal.
Benjamin Otte [Wed, 29 May 2019 14:51:42 +0000 (16:51 +0200)]
Revert "window: Chain up in show/hide"
This reverts commit
863f4d13ff4b46c55ff2111958ca2629c95caf99.
Benjamin Otte [Wed, 29 May 2019 14:33:45 +0000 (16:33 +0200)]
window: Chain up in show/hide
Benjamin Otte [Wed, 29 May 2019 14:31:14 +0000 (16:31 +0200)]
widget: Add marshallers to signals
Yay for better sysprof logs!
Benjamin Otte [Wed, 29 May 2019 13:02:49 +0000 (15:02 +0200)]
widget: Do proper clean up in real_hide()
Do the same things set_visible_flag() does.
Benjamin Otte [Wed, 29 May 2019 13:07:54 +0000 (15:07 +0200)]
widget: Move functions around
Copy them further up so that we can use them there in the next commit.
Benjamin Otte [Wed, 29 May 2019 13:01:18 +0000 (15:01 +0200)]
widget: Insist on proper vfunc calling
Insist that ->show() is only called for invisible and ->hide only for
visible widgets.
Benjamin Otte [Wed, 29 May 2019 12:48:27 +0000 (14:48 +0200)]
widget: Fix transform refcounting in allocate()
Make the transform (transfer full).
1. This makes sure we actually reference the transform. Previously we
did not.
2. Most callers create a new transform to pass to us. Now they don't
have to uref it anymore.
Benjamin Otte [Wed, 29 May 2019 12:29:25 +0000 (14:29 +0200)]
css: Use %f, not %.17f
The testusite failures explain why:
We don't want to print "1.
00000000000000000", but "1".
Benjamin Otte [Wed, 29 May 2019 03:55:28 +0000 (05:55 +0200)]
rendernodeparser: Handle repeating linear gradients
Just handle them like regular gradients, only name them differently.
Benjamin Otte [Wed, 29 May 2019 04:48:03 +0000 (06:48 +0200)]
css: Don't print numbers with exponent
CSS does not do exponents, so printing numbers close to 0 as 1.234e-15
does not work.
Also up the accuracy to 17 digits because that's what everyone else
uses.
Benjamin Otte [Wed, 29 May 2019 03:41:53 +0000 (05:41 +0200)]
broadway: Handle Cairo nodes with NULL surfaces
Matthias Clasen [Wed, 29 May 2019 03:18:26 +0000 (03:18 +0000)]
notebook: Drop position from ::create-window
Global coordinates are going away.
Matthias Clasen [Wed, 29 May 2019 03:07:02 +0000 (03:07 +0000)]
Some entry completion fixes
This gets popover-based entry completion closer
to working as expected. And it drops a use of
gdk_surface_get_origin.
Matthias Clasen [Wed, 29 May 2019 02:23:08 +0000 (22:23 -0400)]
tree models: Use standard padding
Matthias Clasen [Wed, 29 May 2019 01:42:38 +0000 (21:42 -0400)]
treeview column: Make final
Matthias Clasen [Wed, 29 May 2019 01:42:38 +0000 (21:42 -0400)]
treeview: Make final
Make GtkTreeSelection final as well.
Matthias Clasen [Wed, 29 May 2019 00:01:03 +0000 (20:01 -0400)]
flow box: Make final
We keep GtkFlowBoxChild subclassable, though.
Matthias Clasen [Wed, 29 May 2019 00:00:40 +0000 (20:00 -0400)]
listbox Make final
We keep GtkListBoxRow subclassable, though.
Matthias Clasen [Tue, 28 May 2019 23:53:56 +0000 (23:53 +0000)]
notebook: Make final
Matthias Clasen [Tue, 28 May 2019 23:45:45 +0000 (19:45 -0400)]
label: Make final
Matthias Clasen [Tue, 28 May 2019 23:43:43 +0000 (19:43 -0400)]
menubar: Make final
Matthias Clasen [Tue, 28 May 2019 23:37:51 +0000 (23:37 +0000)]
toolbar: make final
Matthias Clasen [Tue, 28 May 2019 23:37:31 +0000 (23:37 +0000)]
menu: Make final
Matthias Clasen [Tue, 28 May 2019 23:30:02 +0000 (23:30 +0000)]
Forgotten file
Matthias Clasen [Tue, 28 May 2019 22:58:58 +0000 (18:58 -0400)]
menu tool button: Make final
Matthias Clasen [Tue, 28 May 2019 22:58:46 +0000 (18:58 -0400)]
radio tool button: Make final
Matthias Clasen [Tue, 28 May 2019 22:58:31 +0000 (18:58 -0400)]
toggle tool button: Use standard padding
Matthias Clasen [Tue, 28 May 2019 22:58:05 +0000 (18:58 -0400)]
tool button: Use standard padding
Matthias Clasen [Tue, 28 May 2019 22:50:08 +0000 (22:50 +0000)]
iconview: Make final
Matthias Clasen [Tue, 28 May 2019 22:35:07 +0000 (22:35 +0000)]
stack: Make final
Matthias Clasen [Tue, 28 May 2019 22:12:20 +0000 (22:12 +0000)]
file chooser error stack: Don't derive from stack
We can just have a GtkStack, instead.
Matthias Clasen [Tue, 28 May 2019 21:04:32 +0000 (17:04 -0400)]
scrolled window: Make final
Matthias Clasen [Tue, 28 May 2019 22:34:47 +0000 (22:34 +0000)]
inspector: Stop deriving from scrolled window
Matthias Clasen [Tue, 28 May 2019 22:11:14 +0000 (22:11 +0000)]
places sidebar: Don't derive from scrolled window
We can just have a scrolled window, instead.
Matthias Clasen [Tue, 28 May 2019 22:16:59 +0000 (22:16 +0000)]
Forgotten file
Matthias Clasen [Tue, 28 May 2019 20:46:07 +0000 (20:46 +0000)]
Merge branch 'wip/matthiasc/popup5' into 'master'
Reimplement popups
See merge request GNOME/gtk!847
Matthias Clasen [Tue, 28 May 2019 19:43:01 +0000 (19:43 +0000)]
inspector: Show surface and renderer
Руслан Ижбулатов [Tue, 28 May 2019 17:25:45 +0000 (17:25 +0000)]
GDK W32: Fix indentation and placate GCC
Руслан Ижбулатов [Tue, 28 May 2019 17:21:42 +0000 (17:21 +0000)]
GDK W32: Correctly log popups
Руслан Ижбулатов [Tue, 28 May 2019 16:39:58 +0000 (16:39 +0000)]
GDK W32: Only use owner windows for popups
GTK4 doesn't have WS_CHILD windows anymore, so hWndParent argument
to CreateWindowEx() is always interpreted as the owner window,
not the parent window.
A window with an owner:
* is above the owner in Z-order
* is destroyed when the owner is destroyed
* is hidden when the owner is minimized
This is enforced by the OS.
GTK can only allow this for popup windows.
Desktop window must never[0] be an owner.
[0]: https://devblogs.microsoft.com/oldnewthing/
20040224-00/?p=40493
Руслан Ижбулатов [Tue, 28 May 2019 16:37:28 +0000 (16:37 +0000)]
GDK W32: No more child windows
We don't have child windows (the window-inside-a-window kind of windows)
anymore. Remove all the code related to that.
Руслан Ижбулатов [Tue, 28 May 2019 16:14:39 +0000 (16:14 +0000)]
Don't assume that gdk_surface[_move]_resize() is asynchronous
On Windows that call resizes the native window immediately,
and the corresponding GDK event is emitted and processed
before the control is returned to gtk_window_move_resize().
Therefore, update freeze and configure_request_count increment
must happen before the call, not after it.
Руслан Ижбулатов [Tue, 28 May 2019 00:35:30 +0000 (00:35 +0000)]
Add missing include
Руслан Ижбулатов [Mon, 27 May 2019 23:51:38 +0000 (23:51 +0000)]
GDK W32: Don't handle WM_ACTIVATE for popup windows
Popups can't be active or inactive, so emitting GDK events
in response to WM_ACTIVATE makes no sense for these kinds
of GDK surfaces.
The jury is still out on whether we should block (return 0)
or ignore (don't return anything) this message.
Blocking WM_NCACTIVATE (which we currently ignore) is definitely
not an option - it completely breaks input somehow.
Matthias Clasen [Mon, 27 May 2019 16:26:19 +0000 (16:26 +0000)]
Avoid compiler warnings
Avoid priv being flagged as unused on win32.
Руслан Ижбулатов [Sun, 26 May 2019 15:36:03 +0000 (15:36 +0000)]
GDK W32: Adjust to new popup surfaces
1) Handle GDK_SURFACE_POPUP in RegisterGdkClass()
(for now pretend it's the same as GDK_SURFACE_TOPLEVEL)
2) Remove useless code from GDK_SURFACE_TOPLEVEL case in _gdk_win32_display_create_surface()
(now there's just GDK_SURFACE_TOPLEVEL there, no need for a type check)
3) Have a separate case for GDK_SURFACE_POPUP and ensure that
it doesn't get WS_CHILDWINDOW (and neither should GDK_SURFACE_TEMP).
Matthias Clasen [Sun, 26 May 2019 03:55:08 +0000 (03:55 +0000)]
surface: Cosmetics
Move things where they belong.
Matthias Clasen [Sat, 25 May 2019 23:11:30 +0000 (23:11 +0000)]
popover: Don't constantly redraw the beak
We don't want to constantly draw the arrow
if we don't have to. Save the render node
to achieve this.
Matthias Clasen [Fri, 24 May 2019 10:59:38 +0000 (10:59 +0000)]
wayland: Disconnect the frame clock
The frame clock can survive the surface now,
so we need to disconnect.
Matthias Clasen [Fri, 24 May 2019 10:55:06 +0000 (10:55 +0000)]
win32: Disconnect the frame clock
The frame clock can now survive the surface,
so we need to disconnect when the surface goes away.
Matthias Clasen [Fri, 24 May 2019 01:55:57 +0000 (01:55 +0000)]
x11: Disconnect from the frame clock
The frame clock can now survive its surface,
so we need to disconnect signal handlers.
Matthias Clasen [Fri, 24 May 2019 01:55:23 +0000 (01:55 +0000)]
broadway: Disconnect from the frame clock
The frame clock can no survive its surface,
so we need to disconnect signal handlers.
Matthias Clasen [Fri, 24 May 2019 01:56:35 +0000 (01:56 +0000)]
surface: Give backends a chance to disconnect
Call the destroy vfunc before clearing
frame clock and gl context, so backends
have a chance to clean up.
Matthias Clasen [Fri, 24 May 2019 01:54:55 +0000 (01:54 +0000)]
fishbowl: Don't pop up popovers too early
Wayland does not like this.
Matthias Clasen [Thu, 23 May 2019 00:18:12 +0000 (00:18 +0000)]
popover: Stop needles allocations
We were queuing an allocation whenever
the popover is flipped over, unnecessarily,
since we don't change the size of the surface.
This was showing up as popovers being invisible
when flipped over, under X.
Matthias Clasen [Wed, 22 May 2019 23:47:59 +0000 (23:47 +0000)]
surface: Fix the fallback move-to-rect implementation
On X11, the final and flipped rects were reporting
global coordinates. This was showing up as misplaced
popover beaks.
Matthias Clasen [Wed, 22 May 2019 22:40:27 +0000 (22:40 +0000)]
win32: Set surface type early enough
We need to set the surface type before
the frame clock.
Matthias Clasen [Wed, 22 May 2019 20:58:24 +0000 (20:58 +0000)]
surface: Make only toplevels control events
There is no need for popups to connect to the frame
clock to pause and unpause events on the display -
the toplevel already does it.
And don't connect to paint either - handle paint
on popups recursively.
Matthias Clasen [Wed, 22 May 2019 22:04:45 +0000 (22:04 +0000)]
gdk: Maintain popup tree in the frontend
We will need this information here, and we can
share the child lists between various backends.
Matthias Clasen [Wed, 22 May 2019 22:35:09 +0000 (22:35 +0000)]
surface: Make surface-type a property
Make surface-type a construct-only property,
so we can set it before the frame clock.
Matthias Clasen [Wed, 22 May 2019 00:45:08 +0000 (20:45 -0400)]
Adwaita: Remove Emoji completion special case
We can use GtkPopover::has-arrow now.
Matthias Clasen [Wed, 22 May 2019 00:43:04 +0000 (00:43 +0000)]
inspector: Avoid a critical warning
Matthias Clasen [Wed, 22 May 2019 00:42:07 +0000 (00:42 +0000)]
popover: Make it possible to not have an arrow
This will make popovers move flexible for other
uses, such as the Emoji completion popup.
Matthias Clasen [Wed, 22 May 2019 00:00:44 +0000 (00:00 +0000)]
popover: Set input shapes on wayland too
No reason not to do it. Wayland has input shapes.
Matthias Clasen [Tue, 21 May 2019 23:41:00 +0000 (23:41 +0000)]
win32: Set the surface type
This is copying some code from the corresponding
create_surface implementations of the other backends.
Руслан Ижбулатов [Tue, 21 May 2019 21:29:38 +0000 (21:29 +0000)]
IME IM: Be able to handle NULL widget correctly
Руслан Ижбулатов [Tue, 21 May 2019 21:20:15 +0000 (21:20 +0000)]
GDK W32: Fix the code to compile
Somewhat change the order of initialization (to be closer
to what Wayland backend does).
Also remove the wrapper field that is no longer needed -
it used to hold a pointer to the main GdkWindow instance,
which wrapped GdkWin32ImplWindow. Since impls are gone,
nothing is wrapping anything anymore.
Fix a substitution error, where wrong pointer was added
to the hash table. Added a comment to ensure that future readers
(including myself) won't be confused by the fact that we're
inserting a pointer instead of the handle itself.
Руслан Ижбулатов [Tue, 21 May 2019 21:17:54 +0000 (21:17 +0000)]
GDK W32: be able to handle NULL cursor
Matthias Clasen [Mon, 20 May 2019 13:19:12 +0000 (13:19 +0000)]
surface: Don't dispose the frame clock prematurely
Since we are now sharing frame clocks with multiple
surfaces, we can no longer dispose them unconditionally
when a surface goes away. Only do it if we are a
toplevel (without parent).
This was showing up as criticals on exit when opening
and closing any popover in widget factory.
Matthias Clasen [Mon, 20 May 2019 12:17:12 +0000 (12:17 +0000)]
tooltip: fix critical warnings
We might trigger a requery while unrooted.
Deal with it.
Matthias Clasen [Mon, 20 May 2019 04:52:22 +0000 (04:52 +0000)]
Mention gtk_widget_get_toplevel in the migration guide.
Matthias Clasen [Mon, 20 May 2019 04:51:31 +0000 (04:51 +0000)]
Drop gtk_widget_get_toplevel
Not used anymore.
Matthias Clasen [Mon, 20 May 2019 04:47:50 +0000 (04:47 +0000)]
Stop using gtk_widget_get_toplevel
All uses of it can be replaced by gtk_widget_get_root.
Matthias Clasen [Mon, 20 May 2019 04:11:25 +0000 (04:11 +0000)]
Cosmetics
Matthias Clasen [Mon, 20 May 2019 03:54:59 +0000 (03:54 +0000)]
Mention gtk_widget_is_toplevel in the migration guide
Matthias Clasen [Mon, 20 May 2019 03:53:43 +0000 (03:53 +0000)]
Drop gtk_widget_is_toplevel
No longer used.
Matthias Clasen [Mon, 20 May 2019 03:31:03 +0000 (03:31 +0000)]
Stop using gtk_widget_is_toplevel
Matthias Clasen [Mon, 20 May 2019 03:22:28 +0000 (03:22 +0000)]
Mention gtk_widget_get_surface in the migration guide
Matthias Clasen [Mon, 20 May 2019 03:20:40 +0000 (03:20 +0000)]
Drop gtk_widget_get_surface
It is no longer used.
Matthias Clasen [Mon, 20 May 2019 00:38:08 +0000 (00:38 +0000)]
Stop using gtk_widget_get_surface
Replace all uses of gtk_widget_get_surface by
gtk_native_get_surface.
Matthias Clasen [Mon, 20 May 2019 00:03:30 +0000 (00:03 +0000)]
Mention modal->autohide rename in migration guide
Matthias Clasen [Mon, 20 May 2019 00:01:05 +0000 (00:01 +0000)]
Add a test for the property renaming
Matthias Clasen [Sun, 19 May 2019 23:53:15 +0000 (23:53 +0000)]
builder tool: Handle modal->autohide rename
Add a facility for renamed properties,
and use it for GtkPopover::modal.
Matthias Clasen [Sun, 19 May 2019 23:46:56 +0000 (19:46 -0400)]
popover: Rename modal to autohide
This is the term we use for the surface,
and it matches the behavior a bit better
than modal.
Update all callers.
Matthias Clasen [Sun, 19 May 2019 03:09:05 +0000 (03:09 +0000)]
win32: Build fixes
Matthias Clasen [Sat, 18 May 2019 15:27:43 +0000 (15:27 +0000)]
testsuite: Fix some a11y output
This was affected by a recent fix to GtkAboutDialog.
Matthias Clasen [Sat, 18 May 2019 14:22:29 +0000 (14:22 +0000)]
testsuite: Fix popover-related failures
Matthias Clasen [Sat, 18 May 2019 13:39:12 +0000 (13:39 +0000)]
window: Make unrealize work again
GtkWidgets unrealize accesses the frame clock
of the surface, so we need to keep the surface
in place until after we've chained up.